import { Opt } from '__com/Opt.js'

export class columnOpt extends Opt {
  constructor(fun) {
    super(fun)
  }

  create() {
    return [
      {
        field: 'title',
        title: '角色包类型',
        minWidth: 150
      },
      {
        title: '操作时间',
        field: 'updateTime',
        minWidth: 180
      },
      {
        title: '操作人',
        field: 'updater',
        minWidth: 180
      },

      {
        title: '操作',
        field: 'operate',
        fixed: 'right',
        width: 160,
        cell: (info) => {
          return {
            btn: [
              {
                title: '编辑',
                color: '#3366FF',
                // code: '0501020000',
                click: (row) => {
                  this.editFun(row)
                }
              },
              {
                title: '查看',
                // code: '0501030000',
                click: (row) => {
                  this.checkFun(row)
                }
              },
              {
                title: info.synced ? '同步' : '',
                // code: '0501030000',
                click: (row) => {
                  this.syncFun(row)
                }
              }
            ]
          }
        }
      }
    ]
  }
}
